.some(m => m.get_backlight() && m.is_active());
});
- if (monitors.length === 0) {
- this._globalScale = null;
- } else if (!this._globalScale) {
- this._globalScale = new BrightnessScale(_('Brightness'), 1.0);
- this._globalScale.connect('notify::value', () => {
- if (this._inhibitUpdates)
- return;
- this._globalScaleChanged = true;
- this._sync();
- });
- }
-
this._monitorScales.clear();
for (const monitor of monitors) {
this._monitorScales.set(monitor, scale);
}
+ if (monitors.length === 0) {
+ this._globalScale = null;
+ } else if (!this._globalScale) {
+ this._globalScale = new BrightnessScale(_('Brightness'), 1.0);
+ this._globalScale.connect('notify::value', () => {
+ if (this._inhibitUpdates)
+ return;
+ this._globalScaleChanged = true;
+ this._sync();
+ });
+ }
+
if (this._globalScale)
this._sync({showOSD: false});